<?php

namespace Xin\ChatGPT\Channels\Zhipu;

use Xin\ChatGPT\Channels\Concerns\Transportable;
use Xin\ChatGPT\Contracts\Model as ModelContract;

class Model implements ModelContract
{
    use Transportable;


    public function lists()
    {
        $response = $this->transporter->get('models');
        $response = $response->getBody()->getContents();
        $result = json_decode($response, true);

        return $result['data'] ?? null;
    }
}
